<!DOCTYPE html>
<html lang="en" dir="ltr">

<head prefix="og: http://ogp.me/ns#">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Android – Yang Blog</title>
    


  
  <script defer src="/js/fuse.min.94c78ad70b02749822921660cf4e9f0b3701bc0680c421afb784a78228de0275.js"></script>



<script src="/js/enquire.min.dfb99dee1e029d51d6cfb672d847929890b1585402de17f5ed092edd72a688b4.js"></script>

<script defer src="/js/lazysizes.min.31dd6a2d3a1ec0f78a8df007535cf23f03aeb5c70f026e6d6a19dac3b3acc340.js"></script>

<script defer src="/js/helper/getParents.min.1618c696be7c98933f9a92677f518b512a74e55bdbb976b09936b4182e93181b.js"></script>

<script defer src="/js/helper/fadeinout.min.93a331f96194789a542f33690bbe4f0c102c7e78ffc018217f5a1c33010bad91.js"></script>

<script defer src="/js/helper/closest.min.js"></script>
  
<script>
  "use strict";

  
  
  if (window.NodeList && !NodeList.prototype.forEach) {
    NodeList.prototype.forEach = Array.prototype.forEach;
  }

  
  if (!String.prototype.includes) {
    String.prototype.includes = function (search, start) {
      'use strict';

      if (search instanceof RegExp) {
        throw TypeError('first argument must not be a RegExp');
      }
      if (start === undefined) { start = 0; }
      return this.indexOf(search, start) !== -1;
    };
  }

  
  Document.prototype.append = Element.prototype.append = function append() {
    this.appendChild(_mutation(arguments));
  };
  function _mutation(nodes) {
    if (!nodes.length) {
      throw new Error('DOM Exception 8');
    } else if (nodes.length === 1) {
      return typeof nodes[0] === 'string' ? document.createTextNode(nodes[0]) : nodes[0];
    } else {
      var
      fragment = document.createDocumentFragment(),
      length = nodes.length,
      index = -1,
      node;

      while (++index < length) {
        node = nodes[index];

        fragment.appendChild(typeof node === 'string' ? document.createTextNode(node) : node);
      }

      return fragment;
    }
  }

  
  if (!String.prototype.startsWith) {
    String.prototype.startsWith = function (searchString, position) {
      position = position || 0;
      return this.indexOf(searchString, position) === position;
    };
  }
  


  document.addEventListener('DOMContentLoaded', function () {
    
    var navCollapseBtn = document.querySelector('.navbar__burger');
    navCollapseBtn ? navCollapseBtn.addEventListener('click', function (e) {
      var navCollapse = document.querySelector('.navbarm__collapse');

      if (navCollapse) {
        var dataOpen = navCollapse.getAttribute('data-open');

        if (dataOpen === 'true') {
          navCollapse.setAttribute('data-open', 'false');
          navCollapse.style.maxHeight = 0;
          navCollapseBtn.classList.remove('is-active');
        } else {
          navCollapse.setAttribute('data-open', 'true');
          navCollapse.style.maxHeight = navCollapse.scrollHeight + "px";
          navCollapseBtn.classList.add('is-active');
        }
      }
    }) : null;
    


    
    var summaryContainer = document.querySelector('.summary__container');
    var searchResult = document.querySelector('.search-result');
    var searchResultCloseBtn = document.querySelector('.search-result__close');
    searchResultCloseBtn ? searchResultCloseBtn.addEventListener('click', function (e) {
      searchResult.setAttribute('data-display', 'none');
      summaryContainer.setAttribute('data-display', 'block');
    }) : null;
    


    
    document.querySelectorAll('.tab') ? 
    document.querySelectorAll('.tab').forEach(function(elem, idx) {
      var containerId = elem.getAttribute('id');
      var containerElem = elem;
      var tabLinks = elem.querySelectorAll('.tab__link');
      var tabContents = elem.querySelectorAll('.tab__content');
      var ids = [];

      tabLinks && tabLinks.length > 0 ?
      tabLinks.forEach(function(link, index, self) {
        link.onclick = function(e) {
          for (var i = 0; i < self.length; i++) {
            if (index === parseInt(i, 10)) {
              if (!self[i].classList.contains('active')) {
                self[i].classList.add('active');
                tabContents[i].style.display = 'block';
              }
            } else {
              self[i].classList.remove('active');
              tabContents[i].style.display = 'none';
            }
          }
        }
      }) : null;
    }) : null;
    


    
    document.querySelectorAll('.codetab') ? 
    document.querySelectorAll('.codetab').forEach(function(elem, idx) {
      var containerId = elem.getAttribute('id');
      var containerElem = elem;
      var codetabLinks = elem.querySelectorAll('.codetab__link');
      var codetabContents = elem.querySelectorAll('.codetab__content');
      var ids = [];

      codetabLinks && codetabLinks.length > 0 ?
      codetabLinks.forEach(function(link, index, self) {
        link.onclick = function(e) {
          for (var i = 0; i < self.length; i++) {
            if (index === parseInt(i, 10)) {
              if (!self[i].classList.contains('active')) {
                self[i].classList.add('active');
                codetabContents[i].style.display = 'block';
              }
            } else {
              self[i].classList.remove('active');
              codetabContents[i].style.display = 'none';
            }
          }
        }
      }) : null;
    }) : null;
    


    
    var gttBtn = document.getElementById("gtt");
    gttBtn.style.display = "none";
    gttBtn.addEventListener('click', function () {
      if (window.document.documentMode) {
        document.documentElement.scrollTop = 0;
      } else {
        scrollToTop(250);
      }
    });

    function scrollToTop(scrollDuration) {
      var scrollStep = -window.scrollY / (scrollDuration / 15);
      var scrollInterval = setInterval(function () {
        if (window.scrollY != 0) {
          window.scrollBy(0, scrollStep);
        }
        else clearInterval(scrollInterval);
      }, 15);
    }

    var scrollFunction = function () {
      if (document.body.scrollTop > 250 || document.documentElement.scrollTop > 250) {
        gttBtn.style.display = "block";
      } else {
        gttBtn.style.display = "none";
      }
    }
    


    
    var expandBtn = document.querySelectorAll('.expand__button');

    for (let i = 0; i < expandBtn.length; i++) {
      expandBtn[i].addEventListener("click", function () {
        var content = this.nextElementSibling;
        if (content.style.maxHeight) {
          content.style.maxHeight = null;
          this.querySelector('svg').classList.add('expand-icon__right');
          this.querySelector('svg').classList.remove('expand-icon__down');
        } else {
          content.style.maxHeight = content.scrollHeight + "px";
          this.querySelector('svg').classList.remove('expand-icon__right');
          this.querySelector('svg').classList.add('expand-icon__down');
        }
      });
    }
    


    
    var lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
    var tocElem = document.querySelector('.toc');
    var tableOfContentsElem = tocElem ? tocElem.querySelector('#TableOfContents') : null;
    var toggleTocElem = document.getElementById('toggle-toc');
    var singleContentsElem = document.querySelector('.single__contents');
    var navbar = document.querySelector('.navbar');
    var tocFlexbox = document.querySelector('.toc__flexbox');
    var tocFlexboxOuter = document.querySelector('.toc__flexbox--outer');
    var expandContents = document.querySelectorAll('.expand__content');
    var boxContents = document.querySelectorAll('.box');
    var notAllowedTitleIds = null;

    
    var tocFolding = JSON.parse("false");
    
    var tocLevels = JSON.parse("[\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"]");
    
    if (tocLevels) {
      tocLevels = tocLevels.toString();
    } else {
      tocLevels = "h1, h2, h3, h4, h5, h6";
    }

    
    singleContentsElem && singleContentsElem.querySelectorAll(".tab") ?
    singleContentsElem.querySelectorAll(".tab").forEach(function (elem) {
      elem.querySelectorAll(tocLevels).forEach(function (element) {
        notAllowedTitleIds = Array.isArray(notAllowedTitleIds) ?
          notAllowedTitleIds.concat(element.getAttribute('id')) :
          [element.getAttribute('id')];
      });
    }) : null;

    
    expandContents ? expandContents.forEach(function(elem) {
      elem.querySelectorAll(tocLevels).forEach(function (element) {
        notAllowedTitleIds = Array.isArray(notAllowedTitleIds) ?
          notAllowedTitleIds.concat(element.getAttribute('id')) :
          [element.getAttribute('id')];
      });
    }) : null;

    
    boxContents ? boxContents.forEach(function(elem) {
      elem.querySelectorAll(tocLevels).forEach(function (element) {
        notAllowedTitleIds = Array.isArray(notAllowedTitleIds) ?
          notAllowedTitleIds.concat(element.getAttribute('id')) :
          [element.getAttribute('id')];
      });
    }) : null;

    
    window.onscroll = function () {
      scrollFunction();
      
      var st = window.pageYOffset || document.documentElement.scrollTop;
      if (st > lastScrollTop) { 
        if (st < 250) {
          gttBtn.style.display = "none";
        } else {
          gttBtn.style.display = "block";
        }

        if (st < 45) {
          return null;
        }
        
        if (!navbar.classList.contains('navbar--hide')) {
          navbar.classList.add('navbar--hide');
        } else if (navbar.classList.contains('navbar--show')) {
          navbar.classList.remove('navbar--show');
        }

        if (singleContentsElem) {
          if (singleContentsElem.querySelectorAll(tocLevels).length > 0) {
            singleContentsElem.querySelectorAll(tocLevels).forEach(function (elem) {
              if (toggleTocElem && !toggleTocElem.checked) {
                return null;
              }

              if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
                return null;
              }
              
              if (document.documentElement.scrollTop >= elem.offsetTop) {
                if (tableOfContentsElem) {
                  var id = elem.getAttribute('id');
                  tocElem.querySelectorAll('a').forEach(function (elem) {
                    elem.classList.remove('active');
                  });
                  tocElem.querySelector('a[href="#' + id + '"]') ?
                    tocElem.querySelector('a[href="#' + id + '"]').classList.add('active') : null;

                  if (false === tocFolding) {
                    
                  } else {
                    tableOfContentsElem.querySelectorAll('ul') ?
                      tableOfContentsElem.querySelectorAll('ul').forEach(function (rootUl) {
                        rootUl.querySelectorAll('li').forEach(function (liElem) {
                          liElem.querySelectorAll('ul').forEach(function (ulElem) {
                            ulElem.style.display = 'none';
                          });
                        });
                      }) : null;
                  }

                  var curElem = tableOfContentsElem.querySelector("[href='#" + id + "']");
                  if (curElem && curElem.nextElementSibling) {
                    curElem.nextElementSibling.style.display = 'block';
                  }
                  getParents(curElem, 'ul') ?
                    getParents(curElem, 'ul').forEach(function (elem) {
                      elem.style.display = 'block';
                    }) : null;
                }
              }
            });
          } else {
            if (tocFlexbox) {
              tocFlexbox.setAttribute('data-position', '');
              if (!tocFlexbox.classList.contains('hide')) {
                tocFlexbox.classList.add('hide');
              }
            }
            if (tocFlexboxOuter) {
              tocFlexboxOuter.setAttribute('data-position', '');
              if (!tocFlexboxOuter.classList.contains('hide')) {
                tocFlexboxOuter.classList.add('hide');
              }
            }
          }
        }
      } else { 
        if (st < 250) {
          gttBtn.style.display = "none";
        }

        if (navbar.classList.contains('navbar--hide')) {
          navbar.classList.remove('navbar--hide');
        } else if (!navbar.classList.contains('navbar--show')) {
          navbar.classList.add('navbar--show');
        }

        if (singleContentsElem) {
          if (singleContentsElem.querySelectorAll(tocLevels).length > 0) {
            singleContentsElem.querySelectorAll(tocLevels).forEach(function (elem) {
              if (toggleTocElem && !toggleTocElem.checked) {
                return null;
              }
              
              if (notAllowedTitleIds && notAllowedTitleIds.includes(elem.getAttribute('id'))) {
                return null;
              }

              if (document.documentElement.scrollTop >= elem.offsetTop) {
                if (tableOfContentsElem) {
                  var id = elem.getAttribute('id');
                  tocElem.querySelectorAll('a').forEach(function (elem) {
                    elem.classList.remove('active');
                  });
                  tocElem.querySelector('a[href="#' + id + '"]') ?
                    tocElem.querySelector('a[href="#' + id + '"]').classList.add('active') : null;

                  if (false === tocFolding) {
                    
                  } else {
                    tableOfContentsElem.querySelectorAll('ul') ?
                      tableOfContentsElem.querySelectorAll('ul').forEach(function (rootUl) {
                        rootUl.querySelectorAll('li').forEach(function (liElem) {
                          liElem.querySelectorAll('ul').forEach(function (ulElem) {
                            ulElem.style.display = 'none';
                          });
                        });
                      }) : null;
                  }

                  var curElem = tableOfContentsElem.querySelector("[href='#" + id + "']");
                  if (curElem && curElem.nextElementSibling) {
                    curElem.nextElementSibling.style.display = 'block';
                  }
                  getParents(curElem, 'ul') ?
                    getParents(curElem, 'ul').forEach(function (elem) {
                      elem.style.display = 'block';
                    }) : null;
                }
              }
            });
          } else {
            if (tocFlexbox && !tocFlexbox.classList.contains('hide')) {
              tocFlexbox.classList.add('hide');
            }
            if (tocFlexboxOuter && !tocFlexboxOuter.classList.contains('hide')) {
              tocFlexboxOuter.classList.add('hide');
            }
          }
          
        }

        if (tableOfContentsElem && document.documentElement.scrollTop < 250) {
          if (false === tocFolding) {

          } else {
            tableOfContentsElem.querySelector('ul') ?
              tableOfContentsElem.querySelector('ul').querySelectorAll('li').forEach(function (liElem) {
                liElem.querySelectorAll('ul').forEach(function (ulElem) {
                  ulElem.style.display = 'none';
                });
              }) : null;
          }
        }
      }
      lastScrollTop = st <= 0 ? 0 : st;
    };
  


  
    var localTheme = localStorage.getItem('theme');
    var rootEleme = document.getElementById('root');
    var selectThemeElem = document.querySelectorAll('.select-theme');
    var selectThemeItemElem = document.querySelectorAll('.select-theme__item');

    var setMetaColor = function(themeColor) {
      var metaMsapplicationTileColor = document.getElementsByName('msapplication-TileColor')[0];
      var metaThemeColor = document.getElementsByName('theme-color')[0];
      var metaMsapplicationNavbuttonColor = document.getElementsByName('msapplication-navbutton-color')[0];
      var metaAppleMobileWebAappStatusBarStyle = document.getElementsByName('apple-mobile-web-app-status-bar-style')[0];

      if (themeColor.includes('dark')) {
        metaMsapplicationTileColor.setAttribute('content', '#fcfcfa');
        metaThemeColor.setAttribute('content', '#403E41');
        metaMsapplicationNavbuttonColor.setAttribute('content', '#403E41');
        metaAppleMobileWebAappStatusBarStyle.setAttribute('content', '#403E41');
      } else if (themeColor.includes('light')) {
        metaMsapplicationTileColor.setAttribute('content', '#555');
        metaThemeColor.setAttribute('content', '#eee');
        metaMsapplicationNavbuttonColor.setAttribute('content', '#eee');
        metaAppleMobileWebAappStatusBarStyle.setAttribute('content', '#eee');
      } else if (themeColor.includes('hacker')) {
        metaMsapplicationTileColor.setAttribute('content', '#e3cd26');
        metaThemeColor.setAttribute('content', '#252526');
        metaMsapplicationNavbuttonColor.setAttribute('content', '#252526');
        metaAppleMobileWebAappStatusBarStyle.setAttribute('content', '#252526');
      } else if (themeColor.includes('solarized')) {
        metaMsapplicationTileColor.setAttribute('content', '#d3af86');
        metaThemeColor.setAttribute('content', '#51412c');
        metaMsapplicationNavbuttonColor.setAttribute('content', '#51412c');
        metaAppleMobileWebAappStatusBarStyle.setAttribute('content', '#51412c');
      } else if (themeColor.includes('kimbie')) {
        metaMsapplicationTileColor.setAttribute('content', '#586e75');
        metaThemeColor.setAttribute('content', '#eee8d5');
        metaMsapplicationNavbuttonColor.setAttribute('content', '#eee8d5');
        metaAppleMobileWebAappStatusBarStyle.setAttribute('content', '#eee8d5');
      } 
    }
    
    if (localTheme) {
      selectThemeItemElem ? 
      selectThemeItemElem.forEach(function (elem) {
        if (elem.text.trim() === localTheme) {
          elem.classList.add('is-active');
        } else {
          elem.classList.remove('is-active');
        }
      }) : null;

      setMetaColor(localTheme);
    } else {
      setMetaColor(rootEleme.className);
    }

    selectThemeItemElem ? 
    selectThemeItemElem.forEach(function (v, i) {
      v.addEventListener('click', function (e) {
        var selectedThemeVariant = e.target.text.trim();
        localStorage.setItem('theme', selectedThemeVariant);
        setMetaColor(selectedThemeVariant);

        rootEleme.removeAttribute('class');
        rootEleme.classList.add('theme__' + selectedThemeVariant);
        selectThemeElem.forEach(function(rootElem) {
          rootElem.querySelectorAll('a').forEach(function (elem) {
            if (elem.classList) {
              if (elem.text.trim() === selectedThemeVariant) {
                if (!elem.classList.contains('is-active')) {
                  elem.classList.add('is-active');
                }
              } else {
                if (elem.classList.contains('is-active')) {
                  elem.classList.remove('is-active');
                }
              }
            }
          });
        });

        if (window.mermaid) {
          if (selectedThemeVariant === "dark" || selectedThemeVariant === "hacker") {
            mermaid.initialize({ theme: 'dark' });
            location.reload();
          } else {
            mermaid.initialize({ theme: 'default' });
            location.reload();
          }
        }

        var utterances = document.getElementById('utterances');
        if (utterances) {
          utterances.querySelector('iframe').contentWindow.postMessage({
            type: 'set-theme',
            theme: selectedThemeVariant === "dark" || selectedThemeVariant === "hacker" ? 'photon-dark' : selectedThemeVariant === 'kimbie' ? 'github-dark-orange' : 'github-light',
          }, 'https://utteranc.es');
        }

        var twitterCards = document.querySelectorAll('.twitter-timeline');
        if (twitterCards) {
          window.postMessage({
            type: 'set-twitter-theme',
            theme: selectedThemeVariant === 'light' || selectedThemeVariant === 'solarized' ? 'light' : 'dark',
          });
        }
      });
    }) : null;
  


  
    
    var baseurl = JSON.parse("\"https://blog.jiyang.site/\"");
    
    var permalink = JSON.parse("\"https://blog.jiyang.site/categories/android/\"");
    
    var langprefix = JSON.parse("\"\"");
    var searchResults = null;
    var searchMenu = null;
    var searchText = null;
    
    
    var enableSearch = JSON.parse("true");
    
    var enableSearchHighlight = JSON.parse("true");
    
    var searchResultPosition = JSON.parse("null");
    
    var sectionType = JSON.parse("\"categories\"");
    
    var kind = JSON.parse("\"term\"");
    
    var fuse = null;

    if (enableSearch) {
      (function initFuse() {
        var xhr = new XMLHttpRequest();
        if (sectionType === "publication" && kind !== "page") {
          xhr.open('GET', permalink + "index.json");
        } else {
          xhr.open('GET', baseurl + langprefix + "/index.json");
        }
        
        xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
        xhr.onload = function () {
          if (xhr.status === 200) {
            fuse = new Fuse(JSON.parse(xhr.response.toString('utf-8')), {
              keys: sectionType.includes('publication') ? ['title', 'abstract'] : ['title', 'description', 'content'],
              includeMatches: enableSearchHighlight,
              shouldSort: true,
              threshold: 0.4,
              location: 0,
              distance: 100,
              maxPatternLength: 32,
              minMatchCharLength: 1,
            });
            window.fuse = fuse;
          }
          else {
            console.error('[' + xhr.status + ']Error:', xhr.statusText);
          }
        };
        xhr.send();
      })();
    }

    function makeLi(ulElem, obj) {
      var li = document.createElement('li');
      li.className = 'search-result__item';
      
      var a = document.createElement('a');
      a.innerHTML = obj.title;
      a.setAttribute('class', 'search-result__item--title');
      a.setAttribute('href', obj.permalink);

      var descDiv = document.createElement('div');
      descDiv.setAttribute('class', 'search-result__item--desc');
      if (obj.description) {
        descDiv.innerHTML = obj.description;
      } else if (obj.content) {
        descDiv.innerHTML = obj.content.substring(0, 225);
      }
      
      li.appendChild(a);
      li.appendChild(descDiv);
      ulElem.appendChild(li);
    }

    function makeHighlightLi(ulElem, obj) {
      var li = document.createElement('li');
      li.className = 'search-result__item';
      var descDiv = null;

      var a = document.createElement('a');
      a.innerHTML = obj.item.title;
      a.setAttribute('class', 'search-result__item--title');
      a.setAttribute('href', obj.item.uri);

      if (obj.matches && obj.matches.length) {
        for (var i = 0; i < obj.matches.length; i++) {
          if ('title' === obj.matches[i].key) {
            a = document.createElement('a');
            a.innerHTML = generateHighlightedText(obj.matches[i].value, obj.matches[i].indices);
            a.setAttribute('class', 'search-result__item--title');
            a.setAttribute('href', obj.item.uri);
          }
          
          if ('description' === obj.matches[i].key) {
            descDiv = document.createElement('div');
            descDiv.setAttribute('class', 'search-result__item--desc');
            descDiv.innerHTML = generateHighlightedText(obj.item.description, obj.matches[i].indices);
          } else if ('content' === obj.matches[i].key) {
            if (!descDiv) {
              descDiv = document.createElement('div');
              descDiv.setAttribute('class', 'search-result__item--desc');
              descDiv.innerHTML = generateHighlightedText(obj.item.content.substring(0, 150), obj.matches[i].indices);
            }
          } else {
            if (obj.item.description) {
              descDiv = document.createElement('div');
              descDiv.setAttribute('class', 'search-result__item--desc');
              descDiv.innerHTML = obj.item.description;
            } else {
              descDiv = document.createElement('div');
              descDiv.setAttribute('class', 'search-result__item--desc');
              descDiv.innerHTML = obj.item.content.substring(0, 150);
            }
          }
        }

        li.appendChild(a);
        if (descDiv) {
          li.appendChild(descDiv);
        }
        if (li) {
          ulElem.appendChild(li);
        }
      }
    }

    function renderSearchResultsSide(searchText, results) {
      searchResults = document.getElementById('search-results');
      searchMenu = document.getElementById('search-menu');
      searchResults.setAttribute('class', 'dropdown is-active');
      
      var ul = document.createElement('ul');
      ul.setAttribute('class', 'dropdown-content search-content');

      if (results.length) {
        results.forEach(function (result) {
          var li = document.createElement('li');
          var a = document.createElement('a');
          a.setAttribute('href', result.uri);
          a.setAttribute('class', 'dropdown-item');
          a.appendChild(li);

          var titleDiv = document.createElement('div');
          titleDiv.innerHTML = result.title;
          titleDiv.setAttribute('class', 'menu-item__title');

          var descDiv = document.createElement('div');
          descDiv.setAttribute('class', 'menu-item__desc');
          if (result.description) {
            descDiv.innerHTML = result.description;
          } else if (result.content) {
            descDiv.innerHTML = result.content.substring(0, 150);
          }

          li.appendChild(titleDiv);
          li.appendChild(descDiv);
          ul.appendChild(a);
        });
      } else {
        var li = document.createElement('li');
        li.setAttribute('class', 'dropdown-item');
        li.innerText = 'No results found';
        ul.appendChild(li);
      }

      while (searchMenu.hasChildNodes()) {
        searchMenu.removeChild(
          searchMenu.lastChild
        );
      }
      
      searchMenu.appendChild(ul);
    }

    function renderSearchHighlightResultsSide(searchText, results) {
      searchResults = document.getElementById('search-results');
      searchMenu = document.getElementById('search-menu');
      searchResults.setAttribute('class', 'dropdown is-active');

      var ul = document.createElement('ul');
      ul.setAttribute('class', 'dropdown-content search-content');

      if (results.length) {
        results.forEach(function (result) {
          var li = document.createElement('li');
          var a = document.createElement('a');
          var descDiv = null;

          a.setAttribute('href', result.item.uri);
          a.setAttribute('class', 'dropdown-item');
          a.appendChild(li);

          var titleDiv = document.createElement('div');
          titleDiv.innerHTML = result.item.title;
          titleDiv.setAttribute('class', 'menu-item__title');
          
          if (result.matches && result.matches.length) {
            for (var i = 0; i < result.matches.length; i++) {
              if ('title' === result.matches[i].key) {
                titleDiv.innerHTML = generateHighlightedText(result.matches[i].value, result.matches[i].indices);
              }

              if ('description' === result.matches[i].key) {
                descDiv = document.createElement('div');
                descDiv.setAttribute('class', 'menu-item__desc');
                descDiv.innerHTML = generateHighlightedText(result.item.description, result.matches[i].indices);
              } else if ('content' === result.matches[i].key) {
                if (!descDiv) {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'menu-item__desc');
                  descDiv.innerHTML = generateHighlightedText(result.item.content.substring(0, 150), result.matches[i].indices);
                }
              } else {
                if (result.item.description) {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'menu-item__desc');
                  descDiv.innerHTML = result.item.description;
                } else {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'menu-item__desc');
                  descDiv.innerHTML = result.item.content.substring(0, 150);
                }
              }
            }
            
            li.appendChild(titleDiv);
            if (descDiv) {
              li.appendChild(descDiv);
            }
            ul.appendChild(a);
          }
        });
      } else {
        var li = document.createElement('li');
        li.setAttribute('class', 'dropdown-item');
        li.innerText = 'No results found';
        ul.appendChild(li);
      }

      while (searchMenu.hasChildNodes()) {
        searchMenu.removeChild(
          searchMenu.lastChild
        );
      }
      searchMenu.appendChild(ul);
    }

    function renderSearchResultsMobile(searchText, results) {
      searchResults = document.getElementById('search-mobile-results');

      var content = document.createElement('div');
      content.setAttribute('class', 'mobile-search__content');

      if (results.length > 0) {
        results.forEach(function (result) {
          var item = document.createElement('a');
          item.setAttribute('href', result.uri);
          item.innerHTML = '<div class="mobile-search__item"><div class="mobile-search__item--title">📄 ' + result.title + '</div><div class="mobile-search__item--desc">' + (result.description ? result.description : result.content) + '</div></div>';
          content.appendChild(item);
        });
      } else {
        var item = document.createElement('span');
        content.appendChild(item);
      }

      let wrap = document.getElementById('search-mobile-results');
      while (wrap.firstChild) {
        wrap.removeChild(wrap.firstChild)
      }
      searchResults.appendChild(content);      
    }

    function renderSearchHighlightResultsMobile(searchText, results) {
      searchResults = document.getElementById('search-mobile-results');

      var ul = document.createElement('div');
      ul.setAttribute('class', 'mobile-search__content');

      if (results.length) {
        results.forEach(function (result) {
          var li = document.createElement('li');
          var a = document.createElement('a');
          var descDiv = null;

          a.setAttribute('href', result.item.uri);
          a.appendChild(li);
          li.setAttribute('class', 'mobile-search__item');

          var titleDiv = document.createElement('div');
          titleDiv.innerHTML = result.item.title;
          titleDiv.setAttribute('class', 'mobile-search__item--title');
          
          if (result.matches && result.matches.length) {
            for (var i = 0; i < result.matches.length; i++) {
              if ('title' === result.matches[i].key) {
                titleDiv.innerHTML = generateHighlightedText(result.matches[i].value, result.matches[i].indices);
              }

              if ('description' === result.matches[i].key) {
                descDiv = document.createElement('div');
                descDiv.setAttribute('class', 'mobile-search__item--desc');
                descDiv.innerHTML = generateHighlightedText(result.item.description, result.matches[i].indices);
              } else if ('content' === result.matches[i].key) {
                if (!descDiv) {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'mobile-search__item--desc');
                  descDiv.innerHTML = generateHighlightedText(result.item.content.substring(0, 150), result.matches[i].indices);
                }
              } else {
                if (result.item.description) {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'mobile-search__item--desc');
                  descDiv.innerHTML = result.item.description;
                } else {
                  descDiv = document.createElement('div');
                  descDiv.setAttribute('class', 'mobile-search__item--desc');
                  descDiv.innerHTML = result.item.content.substring(0, 150);
                }
              }
            }
            
            li.appendChild(titleDiv);
            if (descDiv) {
              li.appendChild(descDiv);
            }
            ul.appendChild(a);
          }
        });
      } else {
        var item = document.createElement('span');
        ul.appendChild(item);
      }

      let wrap = document.getElementById('search-mobile-results');
      while (wrap.firstChild) {
        wrap.removeChild(wrap.firstChild)
      }
      searchResults.appendChild(ul);
    }

    function generateHighlightedText(text, regions) {
      if (!regions) {
        return text;
      }

      var content = '', nextUnhighlightedRegionStartingIndex = 0;

      regions.forEach(function(region) {
        if (region[0] === region[1]) {
          return null;
        }
        
        content += '' +
          text.substring(nextUnhighlightedRegionStartingIndex, region[0]) +
          '<span class="search__highlight">' +
            text.substring(region[0], region[1] + 1) +
          '</span>' +
        '';
        nextUnhighlightedRegionStartingIndex = region[1] + 1;
      });

      content += text.substring(nextUnhighlightedRegionStartingIndex);

      return content;
    };

    var searchElem = document.getElementById('search');
    var searchMobile = document.getElementById('search-mobile');
    var searchResultsContainer = document.getElementById('search-results');

    searchElem ?
    searchElem.addEventListener('input', function(e) {
      if (!e.target.value | window.innerWidth < 770) {
        searchResultsContainer ? searchResultsContainer.setAttribute('class', 'dropdown') : null;
        searchResult ? searchResult.setAttribute('data-display', 'none') : null;
        summaryContainer ? summaryContainer.setAttribute('data-display', 'block') : null;
        return null;
      }

      searchText = e.target.value;
      var results = fuse.search(e.target.value);
      
      if (searchResultPosition === "main") {
        if (enableSearchHighlight) {
          renderSearchHighlightResultsMain(searchText, results);
        } else {
          renderSearchResultsMain(searchText, results);
        }
      } else {
        if (enableSearchHighlight) {
          renderSearchHighlightResultsSide(searchText, results);
        } else {
          renderSearchResultsSide(searchText, results);
        }
        
        var dropdownItems = searchResultsContainer.querySelectorAll('.dropdown-item');
        dropdownItems ? dropdownItems.forEach(function(item) {
          item.addEventListener('mousedown', function(e) {
            e.target.click();
          });
        }) : null;
      }
    }) : null;

    searchElem ? 
    searchElem.addEventListener('blur', function() {
      if (window.innerWidth < 770) {
        return null;
      }
      searchResultsContainer ? searchResultsContainer.setAttribute('class', 'dropdown') : null;
    }) : null;

    searchElem ? 
    searchElem.addEventListener('click', function(e) {
      if (window.innerWidth < 770) {
        return null;
      }
      if (!e.target.value) {
        searchResultsContainer ? searchResultsContainer.setAttribute('class', 'dropdown') : null;
        return null;
      }

      searchText = e.target.value;
      var results = fuse.search(e.target.value);

      if (searchResultPosition === "main") {
        if (enableSearchHighlight) {
          renderSearchHighlightResultsMain(searchText, results);
        } else {
          renderSearchResultsMain(searchText, results);
        }
      } else{
        if (enableSearchHighlight) {
          renderSearchHighlightResultsSide(searchText, results);
        } else {
          renderSearchResultsSide(searchText, results);
        }

        var dropdownItems = searchResultsContainer.querySelectorAll('.dropdown-item');
        dropdownItems ? dropdownItems.forEach(function (item) {
          item.addEventListener('mousedown', function (e) {
            e.target.click();
          });
        }) : null;
      }
    }) : null;

    var searchMenuElem = document.getElementById("search-menu");
    var activeItem = document.querySelector('#search-menu .dropdown-item.is-active');
    var activeIndex = null;
    var items = null;
    var searchContainerMaxHeight = 350;

    searchElem ? 
    searchElem.addEventListener('keydown', function(e) {
      if (window.innerWidth < 770) {
        return null;
      }

      if (e.key === 'Escape') {
        searchResult ? searchResult.setAttribute('data-display', 'none') : null;
        summaryContainer ? summaryContainer.setAttribute('data-display', 'block') : null;
      }

      var items = document.querySelectorAll('#search-menu .dropdown-item');
      var keyCode = e.which || e.keyCode;

      if (!items || !items.length) {
        return null;
      }
      
      if (e.key === 'ArrowDown' || keyCode === 40) {
        if (activeIndex === null) {
          activeIndex = 0;
          items[activeIndex].classList.remove('is-active');
        } else {
          items[activeIndex].classList.remove('is-active');
          activeIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;
        }
        items[activeIndex].classList.add('is-active');

        let overflowedPixel = items[activeIndex].offsetTop + items[activeIndex].clientHeight - searchContainerMaxHeight;
        if (overflowedPixel > 0) {
          document.querySelector(".search-content").scrollTop += items[activeIndex].getBoundingClientRect().height;
        } else if (activeIndex === 0) {
          document.querySelector(".search-content").scrollTop = 0;
        }
      } else if (e.key === 'ArrowUp' || keyCode === 38) {
        if (activeIndex === null) {
          activeIndex = items.length - 1;
          items[activeIndex].classList.remove('is-active');
        } else {
          items[activeIndex].classList.remove('is-active');
          activeIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;
        }
        items[activeIndex].classList.add('is-active');
        
        let overflowedPixel = items[activeIndex].offsetTop + items[activeIndex].clientHeight - searchContainerMaxHeight;
        if (overflowedPixel < 0) {
          document.querySelector(".search-content").scrollTop -= items[activeIndex].getBoundingClientRect().height;
        } else {
          document.querySelector(".search-content").scrollTop = overflowedPixel + items[activeIndex].getBoundingClientRect().height;
        }
      } else if (e.key === 'Enter' || keyCode === 13) {
        if (items[activeIndex] && items[activeIndex].getAttribute('href')) {
          location.href = items[activeIndex].getAttribute('href');
        }
      } else if (e.key === 'Escape' || keyCode === 27) {
        e.target.value = null;
        if (searchResults) {
          searchResults.classList.remove('is-active');
        }
      }
    }) : null;

    searchMobile ? 
    searchMobile.addEventListener('input', function(e) {
      if (!e.target.value) {
        let wrap = document.getElementById('search-mobile-results');
        while (wrap.firstChild) {
          wrap.removeChild(wrap.firstChild);
        }
        return null;
      }

      searchText = e.target.value;
      var results = fuse.search(e.target.value);
      renderSearchResultsMobile(searchText, results);
      if (enableSearchHighlight) {
        renderSearchHighlightResultsMobile(searchText, results);
      } else {
        renderSearchResultsMobile(searchText, results);
      }
    }) : null;
  


  
    var mobileSearchInputElem = document.querySelector('#search-mobile');
    var mobileSearchClassElem = document.querySelector('.mobile-search');
    var mobileSearchBtnElem = document.querySelector('#mobileSearchBtn');
    var mobileSearchCloseBtnElem = document.querySelector('#search-mobile-close');
    var mobileSearchContainer = document.querySelector('#search-mobile-container');
    var mobileSearchResultsElem = document.querySelector('#search-mobile-results');
    var htmlElem = document.querySelector('html');

    if (mobileSearchClassElem) {
      mobileSearchClassElem.style.display = 'none';
    }

    mobileSearchBtnElem ? 
    mobileSearchBtnElem.addEventListener('click', function () {
      if (mobileSearchContainer) {
        mobileSearchContainer.style.display = 'block';
      }

      if (mobileSearchInputElem) {
        mobileSearchInputElem.focus();
      }

      if (htmlElem) {
        htmlElem.style.overflowY = 'hidden';
      }
    }) : null;

    mobileSearchCloseBtnElem ? 
    mobileSearchCloseBtnElem.addEventListener('click', function() {
      if (mobileSearchContainer) {
        mobileSearchContainer.style.display = 'none';
      }

      if (mobileSearchInputElem) {
        mobileSearchInputElem.value = '';
      }
      
      if (mobileSearchResultsElem) {
        while (mobileSearchResultsElem.firstChild) {
          mobileSearchResultsElem.removeChild(mobileSearchResultsElem.firstChild);
        }
      }

      if (htmlElem) {
        htmlElem.style.overflowY = 'visible';
      }
    }) : null;

    mobileSearchInputElem ?
    mobileSearchInputElem.addEventListener('keydown', function(e) {
      var keyCode = e.which || e.keyCode;
      if (e.key === 'Escape' || keyCode === 27) {
        if (mobileSearchContainer) {
          mobileSearchContainer.style.display = 'none';
        }
        
        if (mobileSearchInputElem) {
          mobileSearchInputElem.value = '';
        }

        if (mobileSearchResultsElem) {
          while (mobileSearchResultsElem.firstChild) {
            mobileSearchResultsElem.removeChild(mobileSearchResultsElem.firstChild);
          }
        }
        if (htmlElem) {
          htmlElem.style.overflowY = 'visible';
        }
      }
    }) : null;
  


  
    function renderSearchResultsMain(searchText, results) {
      var searchBody = document.querySelector('.search-result__body');
      var originUl = searchBody.querySelector('ul');
      var ul = document.createElement('ul');
      
      if (!searchText) {
        searchResult ? searchResult.setAttribute('data-display', 'none') : null;
        summaryContainer ? summaryContainer.setAttribute('data-display', 'block') : null;
      } else if (results) {
        if (results && results.length) {
          results.forEach(function (result) {
            makeLi(ul, result);
          });

          searchResult ? searchResult.setAttribute('data-display', 'block') : null;
          summaryContainer ? summaryContainer.setAttribute('data-display', 'none') : null;
        }
      }

      originUl.parentNode.replaceChild(ul, originUl);
    }

    function renderSearchHighlightResultsMain(searchText, results) {
      var searchBody = document.querySelector('.search-result__body');
      var originUl = searchBody.querySelector('ul');
      var ul = document.createElement('ul');

      if (!searchText) {
        searchResult ? searchResult.setAttribute('data-display', 'none') : null;
        summaryContainer ? summaryContainer.setAttribute('data-display', 'block') : null;
      } else if (results) {
        if (results && results.length) {
          results.forEach(function (result) {
            makeHighlightLi(ul, result);
          });

          searchResult ? searchResult.setAttribute('data-display', 'block') : null;
          summaryContainer ? summaryContainer.setAttribute('data-display', 'none') : null;
        }
      }

      originUl.parentNode.replaceChild(ul, originUl);
    }
  
  });
</script>    
    


<link rel="stylesheet" href="/css/main.min.css">


    
<link rel="alternate" type="application/rss&#43;xml" title="RSS" href="https://blog.jiyang.site/categories/android/index.xml">

<meta name="description" content="Ji Yang(YangJi) blog." />


<meta name="created" content="2020-09-05T22:41:45&#43;0800">
<meta name="modified" content="2020-09-05T22:41:45&#43;0800">
<meta property="article:published_time" content="2020-09-05T22:41:45&#43;0800">

<meta name="author" content="Yang">


<meta property="og:site_name" content="Yang Blog">
<meta property="og:title" content="Android">
<meta property="og:url" content="https://blog.jiyang.site/categories/android/">
<meta property="og:type" content="website">
<meta property="og:description" content="Ji Yang(YangJi) blog.">

<meta name="generator" content="Hugo 0.74.3" />
<meta name="msapplication-TileColor" content="#fff">

<meta name="theme-color" content="#fff">

<meta name="msapplication-navbutton-color" content="#fff">

<meta name="apple-mobile-web-app-status-bar-style" content="#fff">

<link rel="canonical" href="https://blog.jiyang.site/categories/android/">

<link rel="manifest" href="/manifest.json">

  
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  <link rel="icon" href="/favicon.png" sizes="any" type="image/png" />
  


    <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebPage",
    "url" : "https://blog.jiyang.site/categories/android/",
    "name": "Android",
    "description": "Ji Yang(YangJi) blog.",
    "mainEntityOfPage": {
      "@type": "WebPage",
      "@id": "https://blog.jiyang.site/"
    },
    "publisher": {
      "@type": "Organization",
      "name": "Yang Blog",
      "url": "https://blog.jiyang.site/"
    }
  }
</script>

    
  
  






  <script>
    
    var baiduAnalyticsId = JSON.parse("\"22764a4cf09dab78361f10e181619e39\"");

    var _hmt = _hmt || [];
    (function () {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?" + baiduAnalyticsId;
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>


    
</head>

<body id="root" class="theme__light">
    <script>
        var localTheme = localStorage.getItem('theme');
        if (localTheme) {
            document.getElementById('root').className = 'theme__' + localTheme;
        }
    </script>
    <div id="container">
        





        <div class="wrapper" data-type="categories" data-kind="term">
            <nav class="navbar" role="navigation" aria-label="main navigation" data-dir="ltr">
  <div class="navbar__brand">
    
    &nbsp;&nbsp;
    
    
      <a href="/" title="Home" rel="home" class="navbar__title-link">
        <h6 class="navbar__title">YangBlog</h6>
      </a>
    
  </div>

  
<div class="theme theme-mobile" data-ani="true">
  <div class="dropdown">
    <button class="dropdown-trigger navbar__slide-down" aria-label="Select Theme Button" style="" data-ani="true">
      <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24"><path fill="none" d="M24 0H0v24h24V0z"/><path fill="currentColor" d="M6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58s4.1-.78 5.66-2.34c3.12-3.12 3.12-8.19 0-11.31l-4.95-4.95c-.39-.39-1.02-.39-1.41 0L6.34 7.93zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"/></svg>      
    </button>
    <div class="dropdown-content select-theme">
      
        
        <a href="#" class="dropdown-item select-theme__item is-active">
          light
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          dark
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          hacker
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          solarized
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          kimbie
        </a>
        
      
    </div>
  </div>
</div>


<div id="mobileSearchBtn" class="mobile-search__btn" data-ani="true">
  <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
</div>

<div id="search-mobile-container" class="mobile-search hide" data-dir="ltr">
  <div class="mobile-search__top">
    <input id="search-mobile" type="text" aria-label="Mobile Search" placeholder="Search" class="mobile-search__top--input"/>
    <div id="search-mobile-close" class="mobile-search__top--icon">
      <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24"><path opacity=".87" fill="none" d="M0 0h24v24H0V0z"/><path fill="currentColor" d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/></svg>
    </div>
  </div>
  <div id="search-mobile-results" class="mobile-search__body">
    
  </div>
</div>


<a role="button" class="navbar__burger" aria-label="menu" aria-expanded="false"
  data-ani="true">
  <span aria-hidden="true"></span>
  <span aria-hidden="true"></span>
  <span aria-hidden="true"></span>
</a>
<div class="navbarm__collapse" data-open="false">
  <ul dir="ltr">
    
    
      
      
      
      

      
        <li class="navbarm__menu--item active">
          <a href="/categories">category</a>
        </li>
      
      
    
      
      
      
      

      
        <li class="navbarm__menu--item ">
          <a href="/posts">posts</a>
        </li>
      
      
    

    
      <li class="navbarm__menu--item ">
        <a href="/tags" class="navbarm__menu--term" data-index="0">
          Tags
        </a>
      </li>
    
      <li class="navbarm__menu--item active">
        <a href="/categories" class="navbarm__menu--term" data-index="1">
          Categories
        </a>
      </li>
    
      <li class="navbarm__menu--item ">
        <a href="/series" class="navbarm__menu--term" data-index="2">
          Series
        </a>
      </li>
    
  </ul>
</div>
  <div class="navbar__menu">
  
<div class="theme" data-ani="true">
  <div class="dropdown">
    <button class="dropdown-trigger navbar__slide-down" aria-label="Select Theme Button" data-ani="true">
      <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24"><path fill="none" d="M24 0H0v24h24V0z"/><path fill="currentColor" d="M6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58s4.1-.78 5.66-2.34c3.12-3.12 3.12-8.19 0-11.31l-4.95-4.95c-.39-.39-1.02-.39-1.41 0L6.34 7.93zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"/></svg>      
    </button>
    <div class="dropdown-content select-theme">
      
        
        <a href="#" class="dropdown-item select-theme__item is-active">
          light
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          dark
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          hacker
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          solarized
        </a>
        
        <a href="#" class="dropdown-item select-theme__item ">
          kimbie
        </a>
        
      
    </div>
  </div>
</div>

  
  
  
  
  
  
  
  <a href="/categories" class="navbar__menu-item navbar__slide-down active" dir="ltr" data-ani="true">category</a>
  
  
  
  
  
  
  
  <a href="/posts" class="navbar__menu-item navbar__slide-down " dir="ltr" data-ani="true">posts</a>
  
  
</div>
</nav>
            
            

<main class="main inner" data-sidebar-position="right">
  <div class="list__main lm">
    <nav class="breadcrumb hide" aria-label="breadcrumbs">
  <script>document.querySelector('.breadcrumb').classList.remove('hide')</script>
  <ol>
    
  
  
  
  
  
  <li >
    
      <a href="https://blog.jiyang.site/" class="capitalize">Yang Blog</a>
    
  </li>
  
  
  <li >
    
      <a href="https://blog.jiyang.site/categories/" class="capitalize">Categories</a>
    
  </li>
  
  
  <li  class="is-active" >
    
      <span>Android</span>
    
  </li>
  
  </ol>
  
</nav>
    <header class="list__header">
      <h5 class="list__header--title capitalize h5">Android</h5>
    </header>
    
    <div class="list__header--desc p2">
      
    </div>

    <div class="summary__container" data-display="block">
      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-08-13-rxjava-thread-dispatch/'>RxJava&#39;s Thread Dispatch</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Aug 17, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;5&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            RxJava 如何做到线程切换的
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-08-10-rxjava-observer-observable/'>RxJava Observer Observable(Not With Thread Dispatch) Source Code</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Aug 10, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;4&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            RxJava 观察者和被观察者的创建流程, 以及如何做到通知观察者的
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-07-21-android-%E6%BA%90%E7%A0%81%E4%B8%AD%E7%9A%84%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F/'>Android 源码中的单例模式</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jul 21, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;4&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            <p>经常使用 <code>Context.getSystemService(String name)</code> 获取一些系统服务。 其实这些服务都是以单例的方式注册在系统中的。 获取到的都是单例对象。</p>
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-07-12-listview%E5%8E%9F%E7%90%86%E5%88%86%E6%9E%90/'>ListView原理分析</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jul 12, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;3&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            <p><img src="http://image.youcute.cn/18-7-12/60411659.jpg" alt="先上张图" /></p>
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-07-09-android%E6%8E%A7%E4%BB%B6%E6%9E%B6%E6%9E%84/'>Android控件架构</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jul 9, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;2&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            <p><img src="http://image.youcute.cn/18-7-9/65379561.jpg" alt="View树结构" /></p>
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2018-06-05-%E7%BB%98%E5%88%B6simpleprogressbar/'>绘制SimpleProgressBar</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jun 5, 2018 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;2&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            <blockquote>
<p>继承 View 实现 ProgressBar, 练习使用 Kotlin</p>
</blockquote>
<blockquote>
<p>参考 <a href="https://github.com/lingochamp/MagicProgressWidget">https://github.com/lingochamp/MagicProgressWidget</a></p>
</blockquote>
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2017-08-22-adb-shell-commands/'>ADB-Shell-Commands</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Aug 22, 2017 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;3&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            ADB:Android Debug Bridge 是能够和手机或模拟器通信的一个命令行工具。下载地址 命令分类 1. ADB Debugging 1 adb devices 输出连接的模拟器/真机列表 1 adb forward tcp:8000 tcp:9000 实现PC和Android设备
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2017-06-07-android-touchevent-dispatch-%E5%86%8D%E5%88%86%E6%9E%90/'>Android TouchEvent Dispatch 再分析</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jun 7, 2017 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;1&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            在 Android 中，一次点击完成实际会产生多个事件，比如一个按钮的点击是: TouchDown → TouchUp → 按钮的 onClickListener 回调触发。 Touch Down Event Touch Down 事件在Parent View 和 View 是否是 clickable 的情况下都
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2017-05-24-lrucache%E7%BC%93%E5%AD%98%E6%9C%BA%E5%88%B6%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86/'>LruCache缓存机制实现原理</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;May 24, 2017 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;4&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            通过使用 LruCache, 查看 LinkedHashMap 源码, 分析 LRU 算法的具体实现细节.
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2017-07-07-anddroid%E5%AA%92%E4%BD%93%E8%A7%A3%E7%A0%81%E5%AD%A6%E4%B9%A0mediacodec-mediaextractor/'>Anddroid媒体解码学习MediaCodec-MediaExtractor</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jan 1, 0001 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;3&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            Android提供了MediaPlayer播放器播放媒体文件，其实MediaPlyer只是对Android Media包下的MediaCode
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2016-11-20-android-studio%E9%9B%86%E6%88%90%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BEsdk/'>Android Studio集成百度地图SDK</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jan 1, 0001 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;2&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            1、建议先阅读百度地图官方的继承指南，针对了Eclipse和Android Studio。 百度官方集成指南 2、下载百度地图SDK Android SDK v4.1.1 下载有两
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2016-12-06-android%E5%9F%BA%E7%A1%80%E7%AE%80%E5%8D%95%E5%9B%9E%E9%A1%BE/'>Android基础简单回顾</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jan 1, 0001 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;7&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            Activity 1. 启动Activity： 系统会先调用onCreate-&gt;onStart-&gt;onResume方法，Activity进入运行状态 2.
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
        
  <article class="summary-classic" data-ani="true">
  <div class="summary-classic__flex-box" >

    

    <div class="summary-classic__content">
      <header>
        <h5 class="title h5"><a href='https://blog.jiyang.site/posts/2017-08-18-android%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/'>Android性能优化</a> </h5>
        <h6 class="subtitle caption">
          <time title="Written At" dir="ltr">📅&nbsp;Jan 1, 0001 </time>
          
          <span title="Reading Time" dir="ltr"> &middot; ☕&nbsp;4&nbsp;min read </span>
          
        </h6>
      </header>
      <div>
        <div class="summary-classic__text p2">
          
            Android程序不能无限制的使用设备的内存和CPU。正如经典所说，设备的资源不是给程序员用的，是给用户用的。在编写程序时，应该经常注意内存
          
        </div>
      </div>
    </div>

    
    
  </div>
  <hr />
</article>

      
      


  
  
  
  
    
  
  <ul class="pagination">
    
      
      <script>
      </script>
      
        <li
        ><a href="/categories/android/">1</a></li>
      
    
      
      <script>
      </script>
      
        <li
        ><a href="/categories/android/page/2/">2</a></li>
      
    
      
      <script>
      </script>
      
        <li
        class="active"><a href="/categories/android/page/3/">3</a></li>
      
    
      
      <script>
      </script>
      
        <li
        ><a href="/categories/android/page/4/">4</a></li>
      
    
      
      <script>
      </script>
      
        <li
        ><a href="/categories/android/page/5/">5</a></li>
      
    
  </ul>

    </div>
    <div class="search-result" data-display="none">
  <div class="search-result__header">
    <div class="search-result__close" data-dir="ltr">
      <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24"><path opacity=".87" fill="none" d="M0 0h24v24H0V0z"/><path fill="currentColor" d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"/></svg>
    </div>
  </div>
  <div class="search-result__body">
    <ul>
      <li class="search-result__item">
        <div class="search-result__item--title">
        </div>
        <div class="search-result__item--desc">
        </div>
      </li>
    </ul>
  </div>
</div>
  </div>

  
    <aside class="list__sidebar r" data-dir="ltr">
      

<ul class="sidebar">
    

<div class="search">
  <span class="icon">
    <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
  </span>
  <input id="search" aria-label="Site Search" class="input" type="text" placeholder="Search" autocomplete="off">
  <div id="search-results" class="dropdown">
    <div id="search-menu" class="dropdown-menu" role="menu">
    </div>
  </div>
</div>


    
    
    
    
        
        <li class="sidebar-recent">
            <a href="/posts/android-ffmpeg-vs-mediacodec-video-decode/" class="sidebar-recent__title p1">Android 上 FFMpeg 和 MediaCodec 视频解码效率对比</a>
        </li>
        
        <li class="sidebar-recent">
            <a href="/posts/collect-android-so-crash/" class="sidebar-recent__title p1">Android 处理 Native Crash</a>
        </li>
        
        <li class="sidebar-recent">
            <a href="/posts/%E4%BD%BF%E7%94%A8-onframemetricsavailablelistener-%E7%BB%9F%E8%AE%A1%E7%BB%98%E5%88%B6%E8%80%97%E6%97%B6/" class="sidebar-recent__title p1">使用 OnFrameMetricsAvailableListener 统计绘制耗时</a>
        </li>
        
        <li class="sidebar-recent">
            <a href="/posts/2020-04-16-animatorset-cancel-android8-%E5%92%8C%E4%BB%A5%E4%B8%8B%E7%89%88%E7%9A%84%E8%A1%8C%E4%B8%BA%E4%B8%8D%E4%B8%80%E8%87%B4%E5%9D%91/" class="sidebar-recent__title p1">AnimatorSet Cancel 在 Android 8 和以下版的行为不一致坑</a>
        </li>
        
        <li class="sidebar-recent">
            <a href="/posts/2020-04-10-textview-%E5%B8%83%E5%B1%80%E5%8E%9F%E7%90%86/" class="sidebar-recent__title p1">TextView 的布局细节</a>
        </li>
        
        <hr class="hr-fade sidebar-hr" />
    
</ul>
<div class="taxo-root">

<div class="taxo">
    <section>
        <span class="title p2">
            <a href="/tags/" class="taxo__title">
                Tags
            </a>
        </span>
        
        
        
            <span class="tag">
                <a href="/tags/arp/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        ARP
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/bfs/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        BFS
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/dwarf/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        DWARF
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/elf/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        ELF
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/ffmpeg/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        FFmpeg
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/icmp/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        ICMP
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/mediacodec/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        MediaCodec
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/nginx/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Nginx
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/rpi_os/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        RPI_OS
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/rx/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Rx
                    </span>
                    <span class="taxo__num" dir="auto">
                        2
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/signal/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Signal
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/tls/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        TLS
                    </span>
                    <span class="taxo__num" dir="auto">
                        2
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/video/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Video
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/view/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        View
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        二叉树
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E4%BB%A3%E7%A0%81%E5%B7%A5%E7%A8%8B/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        代码工程
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        内存泄漏
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E5%A0%86/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        堆
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E6%95%B0%E7%BB%84/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        数组
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E6%A0%91/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        树
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E7%BC%93%E5%AD%98%E7%AE%97%E6%B3%95/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        缓存算法
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E8%AE%A1%E5%88%92/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        计划
                    </span>
                    <span class="taxo__num" dir="auto">
                        2
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E9%93%BE%E8%A1%A8/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        链表
                    </span>
                    <span class="taxo__num" dir="auto">
                        2
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/tags/%E9%9B%B7%E7%94%B5/" class="is-tags taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        雷电
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
    </section>
</div>


<div class="taxo">
    <section>
        <span class="title p2">
            <a href="/categories/" class="taxo__title">
                Categories
            </a>
        </span>
        
        
        
            <span class="tag">
                <a href="/categories/android/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Android
                    </span>
                    <span class="taxo__num" dir="auto">
                        59
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/chrome/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Chrome
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/cpp/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        cpp
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/dart/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Dart
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/flutter/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Flutter
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/git/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Git
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/ios/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        IOS
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/java/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Java
                    </span>
                    <span class="taxo__num" dir="auto">
                        24
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/javascript/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        JavaScript
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/jvm/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        JVM
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/kotlin/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Kotlin
                    </span>
                    <span class="taxo__num" dir="auto">
                        4
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/libc/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        libc
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/linux/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Linux
                    </span>
                    <span class="taxo__num" dir="auto">
                        6
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/python/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Python
                    </span>
                    <span class="taxo__num" dir="auto">
                        7
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/ubuntu/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Ubuntu
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/web/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        Web
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E4%B8%AA%E4%BA%BA/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        个人
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E5%8D%9A%E5%AE%A2/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        博客
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        图像处理
                    </span>
                    <span class="taxo__num" dir="auto">
                        1
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        操作系统
                    </span>
                    <span class="taxo__num" dir="auto">
                        3
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        数据结构
                    </span>
                    <span class="taxo__num" dir="auto">
                        6
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E6%A0%91%E8%8E%93%E6%B4%BE/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        树莓派
                    </span>
                    <span class="taxo__num" dir="auto">
                        2
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E7%AE%97%E6%B3%95/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        算法
                    </span>
                    <span class="taxo__num" dir="auto">
                        14
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        计算机网络
                    </span>
                    <span class="taxo__num" dir="auto">
                        8
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        设计模式
                    </span>
                    <span class="taxo__num" dir="auto">
                        6
                    </span>
                </a>
            </span>
        
        
        
            <span class="tag">
                <a href="/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/" class="is-categories taxo__link" data-dir="ltr">
                    <span class="taxo__text">
                        读书笔记
                    </span>
                    <span class="taxo__num" dir="auto">
                        16
                    </span>
                </a>
            </span>
        
        
    </section>
</div>



</div>


    </aside>
  
</main>

<script>
    
    var sidebarPosition = JSON.parse("\"right\"");
    
    var enableSidebar = JSON.parse("true");

    var listMainElem = document.querySelector('.list__main');
    var listSideElem = document.querySelector('.list__sidebar');

    var gridSmall = 'l';
    var gridBig = 'mr';
    var gridFull = 'lmr'

    if (sidebarPosition === "right") {
        gridSmall = 'r';
        gridBig = 'lm'
    }

    enquire.register("screen and (max-width: 769px)", {
        match: function () {
            if (enableSidebar) {
                listMainElem.classList.remove(gridBig);
                listMainElem.classList.add(gridFull);
                listSideElem.classList.remove(gridSmall);
                listSideElem.classList.add('hide');
            } else {
                if (listMainElem && !listMainElem.classList.contains(gridFull)) {
                    listMainElem.classList.remove(gridBig);
                    listMainElem.classList.add(gridFull);
                }

                if (listSideElem && !listSideElem.classList.contains('hide')) {
                    listSideElem.classList.add('hide');
                }
            }

        },
        unmatch: function () {
            if (enableSidebar) {
                listMainElem.classList.remove(gridFull);
                listMainElem.classList.add(gridBig);
                listSideElem.classList.add(gridSmall);
                listSideElem.classList.remove('hide');
            } else {
                if (listMainElem && !listMainElem.classList.contains(gridFull)) {
                    listMainElem.classList.remove(gridBig);
                    listMainElem.classList.add(gridFull);
                }

                if (listSideElem && !listSideElem.classList.contains('hide')) {
                    listSideElem.classList.add('hide');
                }
            }

            var navCollapseBtn = document.querySelector('.navbar__burger');
            var navCollapse = document.getElementsByClassName('navbarm__collapse')[0];
            if (navCollapse) {
                navCollapse.setAttribute('data-open', false);
                navCollapse.style.maxHeight = 0;
                navCollapseBtn.classList.remove('is-active');
            }
            if (document.getElementsByClassName('navbar__menu')[0]) {
                document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
            }
            if (document.getElementsByClassName('mobile-search')[0]) {
                document.getElementsByClassName('mobile-search')[0].classList.add('hide');
            }
        },
        setup: function () { },
        deferSetup: true,
        destroy: function () { },
    });
</script>



            
            <footer class="footer">
    
    
<div class="footer__social">
  <div class="social">
    
            
    
            
    
            
    
            
    
            
    
            
    
      
      <a href="https://github.com/stefanji" title="github" aria-label="github">
        <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 24 24" version="1.1">
<g id="surface3680">
<path fill="currentColor" d="M 10.898438 2.101562 C 6.300781 2.601562 2.601562 6.300781 2.101562 10.800781 C 1.601562 15.5 4.300781 19.699219 8.398438 21.300781 C 8.699219 21.398438 9 21.199219 9 20.800781 L 9 19.199219 C 9 19.199219 8.601562 19.300781 8.101562 19.300781 C 6.699219 19.300781 6.101562 18.101562 6 17.398438 C 5.898438 17 5.699219 16.699219 5.398438 16.398438 C 5.101562 16.300781 5 16.300781 5 16.199219 C 5 16 5.300781 16 5.398438 16 C 6 16 6.5 16.699219 6.699219 17 C 7.199219 17.800781 7.800781 18 8.101562 18 C 8.5 18 8.800781 17.898438 9 17.800781 C 9.101562 17.101562 9.398438 16.398438 10 16 C 7.699219 15.5 6 14.199219 6 12 C 6 10.898438 6.5 9.800781 7.199219 9 C 7.101562 8.800781 7 8.300781 7 7.601562 C 7 7.199219 7 6.601562 7.300781 6 C 7.300781 6 8.699219 6 10.101562 7.300781 C 10.601562 7.101562 11.300781 7 12 7 C 12.699219 7 13.398438 7.101562 14 7.300781 C 15.300781 6 16.800781 6 16.800781 6 C 17 6.601562 17 7.199219 17 7.601562 C 17 8.398438 16.898438 8.800781 16.800781 9 C 17.5 9.800781 18 10.800781 18 12 C 18 14.199219 16.300781 15.5 14 16 C 14.601562 16.5 15 17.398438 15 18.300781 L 15 20.898438 C 15 21.199219 15.300781 21.5 15.699219 21.398438 C 19.398438 19.898438 22 16.300781 22 12.101562 C 22 6.101562 16.898438 1.398438 10.898438 2.101562 Z M 10.898438 2.101562 "/>
</g>
</svg>

      </a>
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
            
    
    
  
  
    
      <a href="https://blog.jiyang.site/categories/android//index.xml" type="application/rss+xml" title="RSS" aria-label="RSS Feed Link">
        <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><circle fill="currentColor" cx="6.18" cy="17.82" r="2.18"/><path fill="currentColor" d="M5.59 10.23c-.84-.14-1.59.55-1.59 1.4 0 .71.53 1.28 1.23 1.4 2.92.51 5.22 2.82 5.74 5.74.12.7.69 1.23 1.4 1.23.85 0 1.54-.75 1.41-1.59-.68-4.2-3.99-7.51-8.19-8.18zm-.03-5.71C4.73 4.43 4 5.1 4 5.93c0 .73.55 1.33 1.27 1.4 6.01.6 10.79 5.38 11.39 11.39.07.73.67 1.28 1.4 1.28.84 0 1.5-.73 1.42-1.56-.73-7.34-6.57-13.19-13.92-13.92z"/></svg>
      </a>
    
  


  </div>
</div>

    
<div id="gtt">
  <div class="gtt">
    <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M8.12 14.71L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.39-.39-1.02-.39-1.41 0L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.38 1.03.39 1.42 0z"/></svg>
  </div>
</div>

    <hr />

    <div class="basicflex">
        
    </div>

    <div class="footer__poweredby">
        
                
            <p class="caption">
                
                    ©2020, All Rights Reserved
                
            </p>
        

        
            <p class="caption">Powered by <a href="https://gohugo.io/" target="_blank" rel="noreferrer">Hugo</a> and the <a href="https://github.com/zzossig/hugo-theme-zzo" target="_blank" rel="noreferrer">Zzo theme</a></p>
        
        
    </div> 
</footer>
        </div>
        





<div class="wrapper__right hide" data-pad="false" dir="ltr">
  <script>document.querySelector('.wrapper__right').classList.remove('hide')</script>
  
</div>

    </div>
</body>

</html>